<?php

abstract class Controller {
    /** @var View */
    protected $View;
    /** @var Model */
    protected $Model;
    /** @var Persistencia */
    protected $Persistencia;    
    
    protected function getView() {
        return $this->View;
    }

    protected function setView(View $View) {
        $this->View = $View;
    }

    protected function getModel() {
        return $this->Model;
    }

    protected function setModel(Model $Model) {
        $this->Model = $Model;
    }

    protected function getPersistencia() {
        return $this->Persistencia;
    }

    protected function setPersistencia(Persistencia $Persistencia) {
        $this->Persistencia = $Persistencia;
    }  
    
    abstract public function run();

    public function imprime() {
        $this->getView()->imprimeHtml();
    }    
    
}

